package com.godme.code.sentinel;

import com.alibaba.csp.sentinel.slots.block.BlockException;

public class CodeSenderSentinelResource {

    public static boolean sendCodeBlock(String mail, BlockException bk){
        System.err.println("sendCodeBlock: " + bk.getMessage());
        return false;
    }

    public static boolean sendCodeFallback(String mail, Throwable throwable){
        System.err.println("sendCodeFallback: " + throwable.getMessage());
        return false;
    }


    public static int validCodeBlock(String mail, String code, BlockException bk){
        System.err.println("validCodeBlock: " + bk.getMessage());
        return 2;
    }

    public static int validCodeFallback(String mail, String code, Throwable throwable){
        System.err.println("validCodeFallback: " + throwable.getMessage());
        return 2;
    }

}
